/*
 * @Author: vinton
 * @Date: 2021-07-02 15:35:54
 * @LastEditTime: 2021-09-01 20:00:02
 * @LastEditors: Vinton
 * @Description: In User Settings Edit
 * @FilePath: /dc-cocos-tools/utils/downLoad.js
 */
const download = require('download-git-repo')

module.exports = (repoAddr, proName) => new Promise((resolve, reject) => {
  console.log('下载的仓库和路径名字', repoAddr, proName)
  download(
    repoAddr,
    proName,
    {
      clone: true
    },
    err => {
      if (err) {
        reject(err)
      }
      Editor.success('点触组件库，本地获取完成');
      resolve()
    }
  )
})
